﻿using Microsoft.AspNetCore.Mvc;
using ShardingWTM.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Mvc;

namespace ShardingWTM.Areas.HistoryLogs.Controllers
{
    [Area("HistoryLogs")]

    public class QueryCountController : BaseController
    {
        public IActionResult Index()
        {
            int last_mon = 0;
            try
            {
                last_mon = Wtm.DC.Set<MessageLog>().Where(x => x.CreateTime > DateTime.Now.AddMonths(-1)).Count();
            }
            catch (Exception ex)
            {
                throw;
            }
            ViewBag.LastMonCount = last_mon;
            return PartialView();
        }
    }
}
